package com.application.lucky.adapter;

import android.app.Activity;
import android.widget.ImageView;

import com.application.lucky.R;
import com.application.lucky.bean.jsonBean.GroupUserLIstbean;
import com.application.lucky.request.nav.UrlManager;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.qunar.im.ui.util.ProfileUtils;

public class GroupCenterUserAdapter extends BaseQuickAdapter<GroupUserLIstbean, BaseViewHolder> {

    public GroupCenterUserAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, GroupUserLIstbean item) {
        ImageView view = (ImageView) helper.getView(R.id.iv_head_view);
        ProfileUtils.displayGravatarRoundedCornerByImageSrc(((Activity) mContext), UrlManager.getHeadPic(item.getHeadPic()), view);
        helper.setText(R.id.tv_user_name, item.getShowName());
    }
}
